dma: add channels support
authorÁlvaro Fernández Rojas <[email protected]>
Wed, 28 Nov 2018 18:17:50 +0000 (19:17 +0100)
committerTom Rini <[email protected]>
Fri, 7 Dec 2018 13:13:45 +0000 (08:13 -0500)
commit27ab27f85057801953d65d563f2340a22859bbbe
tree8acaa4b15bbbae4321740dfa523d2627b9254ea3
parent10b4dc520811fdfc5a31f6067be2b0cd0753998d
dma: add channels support

This adds channels support for dma controllers that have multiple channels
which can transfer data to/from different devices (enet, usb...).

DMA channle API:
 dma_get_by_index()
 dma_get_by_name()
 dma_request()
 dma_free()
 dma_enable()
 dma_disable()
 dma_prepare_rcv_buf()
 dma_receive()
 dma_send()

Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
[[email protected]: drop unused dma_get_by_index_platdata(),
 add metadata to send/receive ops, add dma_prepare_rcv_buf(),
 minor clean up]
Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
drivers/dma/Kconfig
drivers/dma/dma-uclass.c
include/dma-uclass.h
include/dma.h